<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>

    <link rel="stylesheet" href="../lib/swiper-bundle.min.css" />
    <style>
      #box {
        width: 50%;
        height: 300px;
        background-color: antiquewhite;
        margin: 80px auto;
      }
      .mySwiper{
        width: 100%;
        height: 100%;
      }
    </style>
  </head>
  <body>
    <div id="box">
      <div class="swiper mySwiper">
        <div class="swiper-wrapper">
          <!-- 轮播内容 -->
          <div class="swiper-slide">1</div>
          <div class="swiper-slide">2</div>
          <div class="swiper-slide">3</div>
        </div>

        <!-- 分页器 -->
        <div class="swiper-pagination"></div>
      </div>
    </div>

    <script src="../lib/swiper-bundle.min.js"></script>
    <script>
      // 初始化
      new Swiper(".mySwiper", {
        // navigation: {
        //   nextEl: ".swiper-button-next",
        //   prevEl: ".swiper-button-prev",
        // },
        pagination: {
          el: ".swiper-pagination",
        },

        // autoplay: {
        //   delay: 2500,
        //   disableOnInteraction: false,
        // },
      });
    </script>
  </body>
</html>
